//
//  baseTableViewController.swift
//  TTWeibo
//
//  Created by 唐磊guang on 16/7/3.
//  Copyright © 2016年 唐磊guang. All rights reserved.
//

import UIKit
class baseTableViewController: UITableViewController , VistorViewDelegate {
    
    var isLogin = true
    var vistorViewa: VistorView?
    
    override func loadView() {
        isLogin ? super.loadView() :setUpVistor()
    }
    private func setUpVistor(){
        let vistorView = VistorView()
        vistorView.delegate = self
        view = vistorView
        vistorViewa = vistorView
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(baseTableViewController.registerButtonWillClick))
        navigationItem.rightBarButtonItem =  UIBarButtonItem(title: "登陆", style: UIBarButtonItemStyle.Plain, target: self, action: #selector(baseTableViewController.loginButtonWillClick))
        
    }
    
    //MARK: -- 代理方法
    func registerButtonWillClick(){
        print(#function)
    }
    func loginButtonWillClick(){
        print(#function)
    }

}
